package com.mingsoft.led;

import java.util.HashMap;
import java.util.Map;

public enum Commands {
	UNKOWN(""), CLOSE("close"), PPT_OPEN("ppt_open"), PPT_PREVIOUS(
			"ppt_previous"), PPT_NEXT("ppt_next"), VIDEO_OPEN("video_open"), VIDEO_PLAY(
			"video_play"), VIDEO_PAUSE("video_pause"), VIDEO_VOLUMN_UP(
			"video_volumn_up"), VIDEO_VOLUMN_DOWN("video_volumn_down"), PICTURE_OPEN(
			"picture_open"), PICTURE_PREVIOUS("picture_previous"), PICTURE_NEXT(
			"picture_next"),

	CAMERA_OPEN("camera_open"),

	CAMERA_MOVE_LEFT_TOP("camera_move_left_top"), CAMERA_MOVE_TOP(
			"camera_move_top"), CAMERA_MOVE_RIGHT_TOP("camera_move_right_top"), CAMERA_MOVE_RIGHT(
			"camera_move_right"), CAMERA_MOVE_RIGHT_DOWN(
			"camera_move_right_down"), CAMERA_MOVE_DOWN("camera_move_down"), CAMERA_MOVE_LEFT_DOWN(
			"camera_move_left_down"), CAMERA_MOVE_LEFT("camera_move_left"), CAMERA_ZOOM_IN(
			"camera_zoom_in"), CAMERA_ZOOM_OUT("camera_zoom_out"), CAMERA_FOCUS_IN(
			"camera_focus_in"), CAMERA_FOCUS_OUT("camera_focus_out"), CAMERA_IRIS_OPEN(
			"camera_iris_open"), CAMERA_IRIS_CLOSE("camera_iris_close");
	private String value = null;
	private static Map<String, Commands> maps = new HashMap<String, Commands>();
	static {
		for (Commands c : Commands.values()) {
			maps.put(c.value, c);
		}
	}

	private Commands(String value) {
		this.value = value;
	}

	public String getValue() {
		return value;
	}

	public static Commands getCommands(String v) {
		return maps.containsKey(v) ? maps.get(v) : UNKOWN;
	}
}
